//
//  GlobalService.m
//  VidoarDemo
//
//  Created by xm on 2025/6/17.
//

#import "GlobalService.h"

@interface GlobalService()

@property(nonatomic, strong) XMLogger *logger;
@end

@implementation GlobalService


+ (instancetype)share{
    static GlobalService *bus = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        bus = [[GlobalService alloc]init];
    });
        
    return bus;
}

#pragma mark - getter
- (XMLogger *)logger
{
    if(!_logger){
        _logger = [XMLogger loggerWithScopeName:NSStringFromClass(self.class)];
    }
    
    return _logger;
}
- (GlobalBusSubject *)subject
{
    if(!_subject){
        _subject = [GlobalBusSubject share];
    }
    
    return  _subject;
}

@end
